﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Playercontrol : MonoBehaviour
{
    private Animator ani;
    void Start()
    {
        ani = GetComponent<Animator>();
    }

    // Update is called once per frame
    void Update()
    {
        float horizontal = Input.GetAxis("Horizontal");
        if (Input.GetKey(KeyCode.LeftShift)) {
            horizontal *= 2;
        }
        ani.SetFloat("move", horizontal);
        if (Input.GetKeyDown(KeyCode.U)) {
            ani.SetTrigger("Attack");
        }
    }
}
